﻿#pragma once

#include "CmdHandler3.h"
#include "DblPoint.h"
#include "DblSize.h"
class Scene;
class Pline2D;
class CDblSize;
class CDblPoint;
class Pline2DHandler : public CmdHandler3
{
	Q_OBJECT
public:
	Q_INVOKABLE Pline2DHandler() ;
	~Pline2DHandler();

	virtual void input(const QVariant& data, const QString& rawInput, CommandSource cs) override;
private:
	std::shared_ptr<Pline2D> m_pline;
	CDblPoint m_Start;
	CDblPoint m_Second;
	CDblSize  m_Direction;
	double m_Angle;
	double m_Radius;
	CDblPoint m_Center;
	bool CalPlineSegmentFromSARD();
	void undoPlineSegment();
	void endCommond(Scene* scene);
};
